<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>AI交友列表 - 智能筛选匹配</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #6366f1;
            --primary-light: #f0f9ff;
            --secondary: #64748b;
            --light: #f8fafc;
            --dark: #1e293b;
            --success: #10b981;
            --danger: #ef4444;
            --warning: #f59e0b;
            --border: #e2e8f0;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
            --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
        }
        
        body {
            font-family: 'Inter', system-ui, sans-serif;
            background-color: #f8fafc;
            color: var(--dark);
            line-height: 1.6;
        }
        
        .navbar {
            box-shadow: var(--shadow);
            background-color: white;
        }
        
        .container {
            padding: 2rem 0;
        }
        
        .section-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            padding-bottom: 0.75rem;
            border-bottom: 2px solid var(--primary);
            display: inline-block;
        }
        
        .section-subtitle {
            color: var(--secondary);
            margin-bottom: 2rem;
            max-width: 800px;
        }
        
        /* 筛选区域样式 */
        .filter-container {
            background-color: white;
            border-radius: 0.75rem;
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow);
        }
        
        .filter-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .filter-title {
            font-weight: 600;
            font-size: 1.1rem;
        }
        
        .filter-reset {
            color: var(--primary);
            background: none;
            border: none;
            display: flex;
            align-items: center;
            gap: 0.25rem;
            cursor: pointer;
            font-size: 0.9rem;
        }
        
        .filter-row {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .filter-group {
            flex: 1;
            min-width: 200px;
        }
        
        .filter-label {
            display: block;
            margin-bottom: 0.75rem;
            font-weight: 500;
            color: var(--dark);
        }
        
        .form-control, .form-select {
            border-color: var(--border);
            border-radius: 0.5rem;
            padding: 0.6rem 1rem;
        }
        
        .form-control:focus, .form-select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }
        
        /* 高级筛选折叠面板 */
        .advanced-filters {
            margin-top: 1rem;
            border-top: 1px solid var(--border);
            padding-top: 1.5rem;
        }
        
        .advanced-toggle {
            background: none;
            border: none;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 1rem;
            cursor: pointer;
        }
        
        /* 标签筛选 */
        .tag-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-top: 0.5rem;
        }
        
        .tag-item {
            background-color: var(--light);
            border: 1px solid var(--border);
            border-radius: 999px;
            padding: 0.35rem 1rem;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .tag-item:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        .tag-item.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 筛选按钮组 */
        .filter-actions {
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
            margin-top: 1rem;
        }
        
        .btn-filter {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 0.6rem 1.5rem;
            border-radius: 0.5rem;
            font-weight: 500;
            transition: background-color 0.2s;
        }
        
        .btn-filter:hover {
            background-color: #4f46e5;
        }
        
        .btn-clear {
            background-color: white;
            color: var(--secondary);
            border: 1px solid var(--border);
            padding: 0.6rem 1.5rem;
            border-radius: 0.5rem;
            font-weight: 500;
            transition: all 0.2s;
        }
        
        .btn-clear:hover {
            border-color: var(--secondary);
        }
        
        /* 结果统计 */
        .results-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }
        
        .results-count {
            color: var(--secondary);
            font-size: 0.95rem;
        }
        
        .sort-options {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .sort-label {
            font-size: 0.95rem;
            color: var(--secondary);
        }
        
        /* 交友列表样式 */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1.5rem;
            margin-bottom: 3rem;
        }
        
        .ai-card {
            background-color: white;
            border-radius: 0.75rem;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.3s, box-shadow 0.3s;
        }
        
        .ai-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }
        
        .card-images {
            height: 200px;
            position: relative;
            background-color: var(--light);
        }
        
        .card-image-single {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .card-image-multiple {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, 1fr);
            gap: 2px;
            height: 100%;
        }
        
        .card-image-multiple img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .no-image {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            color: var(--secondary);
            background-color: var(--light);
        }
        
        .no-image i {
            font-size: 3rem;
            margin-bottom: 1rem;
            color: var(--primary-light);
        }
        
        .image-count {
            position: absolute;
            bottom: 0.5rem;
            right: 0.5rem;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            font-size: 0.8rem;
        }
        
        .card-content {
            padding: 1.25rem;
        }
        
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 1rem;
        }
        
        .user-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .user-name {
            font-weight: 600;
            margin-bottom: 0;
        }
        
        .user-meta {
            font-size: 0.875rem;
            color: var(--secondary);
        }
        
        .match-score {
            background-color: var(--primary-light);
            color: var(--primary);
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
            font-weight: 600;
            font-size: 0.875rem;
        }
        
        .card-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            font-size: 1.1rem;
        }
        
        .card-description {
            color: var(--secondary);
            font-size: 0.9rem;
            margin-bottom: 1rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .card-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }
        
        .card-tag {
            background-color: var(--light);
            color: var(--secondary);
            padding: 0.25rem 0.75rem;
            border-radius: 999px;
            font-size: 0.8rem;
        }
        
        .card-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 1rem;
            border-top: 1px solid var(--border);
        }
        
        .card-stats {
            display: flex;
            gap: 1rem;
            font-size: 0.875rem;
            color: var(--secondary);
        }
        
        .stat-item {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .action-buttons {
            display: flex;
            gap: 0.5rem;
        }
        
        .action-btn {
            background: none;
            border: none;
            color: var(--secondary);
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .action-btn:hover {
            background-color: var(--primary-light);
            color: var(--primary);
        }
        
        .action-btn.active {
            color: var(--danger);
        }
        
        .contact-btn {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 0.375rem 1rem;
            border-radius: 0.5rem;
            font-size: 0.875rem;
            font-weight: 500;
            transition: background-color 0.2s;
        }
        
        .contact-btn:hover {
            background-color: #4f46e5;
        }
        
        /* 分页样式 */
        .pagination-container {
            display: flex;
            justify-content: center;
            margin-top: 2rem;
        }
        
        .pagination {
            display: flex;
            gap: 0.5rem;
        }
        
        .page-item {
            list-style: none;
        }
        
        .page-link {
            display: block;
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            border: 1px solid var(--border);
            color: var(--secondary);
            text-decoration: none;
            transition: all 0.2s;
        }
        
        .page-link:hover {
            border-color: var(--primary);
            color: var(--primary);
        }
        
        .page-item.active .page-link {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        .page-item.disabled .page-link {
            opacity: 0.5;
            pointer-events: none;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .filter-row {
                gap: 1rem;
            }
            
            .filter-group {
                min-width: 100%;
            }
            
            .filter-actions {
                flex-direction: column;
            }
            
            .btn-filter, .btn-clear {
                width: 100%;
            }
            
            .results-stats {
                flex-direction: column;
                align-items: flex-start;
                gap: 1rem;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-light">
        <div class="container">
            <a class="navbar-brand" href="#">
                <i class="fas fa-robot text-primary me-2"></i>AI社交
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link active" href="#">AI推荐</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">发现</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">消息</a>
                    </li>
                </ul>
                <div class="d-flex align-items-center gap-3">
                    <button class="btn btn-outline-primary">登录</button>
                    <button class="btn btn-primary">注册</button>
                </div>
            </div>
        </div>
    </nav>
    
    <!-- 主要内容区 -->
    <div class="container">
        <h2 class="section-title">AI交友列表</h2>
        <p class="section-subtitle">通过多种筛选条件，找到最适合你的社交伙伴。我们的AI系统会根据你的筛选偏好，实时优化推荐结果。</p>
        
        <!-- 筛选区域 -->
        <div class="filter-container">
            <div class="filter-header">
                <div class="filter-title">筛选条件</div>
                <button class="filter-reset" id="resetAllFilters">
                    <i class="fas fa-redo-alt"></i> 重置所有筛选
                </button>
            </div>
            
            <!-- 基础筛选 -->
            <div class="filter-row">
                <div class="filter-group">
                    <label class="filter-label">匹配度</label>
                    <select class="form-select" id="matchDegree">
                        <option value="all">全部匹配度</option>
                        <option value="90+">90%以上</option>
                        <option value="80+">80%以上</option>
                        <option value="70+">70%以上</option>
                        <option value="60+">60%以上</option>
                    </select>
                </div>
                
                <div class="filter-group">
                    <label class="filter-label">年龄范围</label>
                    <div class="d-flex gap-2">
                        <input type="number" class="form-control" id="minAge" placeholder="最小" min="18" max="99">
                        <span class="align-self-center">-</span>
                        <input type="number" class="form-control" id="maxAge" placeholder="最大" min="18" max="99">
                    </div>
                </div>
                
                <div class="filter-group">
                    <label class="filter-label">所在城市</label>
                    <select class="form-select" id="city">
                        <option value="all">全部城市</option>
                        <option value="beijing">北京</option>
                        <option value="shanghai">上海</option>
                        <option value="guangzhou">广州</option>
                        <option value="shenzhen">深圳</option>
                        <option value="hangzhou">杭州</option>
                        <option value="chengdu">成都</option>
                        <option value="other">其他城市</option>
                    </select>
                </div>
                
                <div class="filter-group">
                    <label class="filter-label">性别</label>
                    <select class="form-select" id="gender">
                        <option value="all">不限</option>
                        <option value="male">男</option>
                        <option value="female">女</option>
                        <option value="other">其他</option>
                    </select>
                </div>
            </div>
            
            <!-- 兴趣标签筛选 -->
            <div class="filter-group">
                <label class="filter-label">兴趣标签</label>
                <div class="tag-filter" id="interestTags">
                    <div class="tag-item">旅行</div>
                    <div class="tag-item">音乐</div>
                    <div class="tag-item">阅读</div>
                    <div class="tag-item">电影</div>
                    <div class="tag-item">运动</div>
                    <div class="tag-item">美食</div>
                    <div class="tag-item">摄影</div>
                    <div class="tag-item">游戏</div>
                    <div class="tag-item">宠物</div>
                    <div class="tag-item">艺术</div>
                    <div class="tag-item">科技</div>
                    <div class="tag-item">健身</div>
                </div>
            </div>
            
            <!-- 高级筛选折叠面板 -->
            <button class="advanced-toggle" id="advancedToggle">
                <i class="fas fa-chevron-down" id="advancedIcon"></i>
                <span>高级筛选</span>
            </button>
            
            <div class="advanced-filters" id="advancedFilters" style="display: none;">
                <div class="filter-row">
                    <div class="filter-group">
                        <label class="filter-label">活跃时间</label>
                        <select class="form-select" id="activeTime">
                            <option value="all">全部时间</option>
                            <option value="today">今天活跃</option>
                            <option value="week">本周活跃</option>
                            <option value="month">本月活跃</option>
                        </select>
                    </div>
                    
                    <div class="filter-group">
                        <label class="filter-label">社交目的</label>
                        <select class="form-select" id="socialPurpose">
                            <option value="all">全部目的</option>
                            <option value="friendship">普通朋友</option>
                            <option value="hobby">兴趣伙伴</option>
                            <option value="study">学习交流</option>
                            <option value="career">职场人脉</option>
                        </select>
                    </div>
                    
                    <div class="filter-group">
                        <label class="filter-label">内容偏好</label>
                        <select class="form-select" id="contentPreference">
                            <option value="all">全部内容</option>
                            <option value="image">有图片内容</option>
                            <option value="text">文字内容为主</option>
                        </select>
                    </div>
                </div>
                
                <div class="filter-row">
                    <div class="filter-group">
                        <label class="filter-label">最低浏览量</label>
                        <input type="number" class="form-control" id="minViews" placeholder="浏览量下限" min="0">
                    </div>
                    
                    <div class="filter-group">
                        <label class="filter-label">最低互动数</label>
                        <input type="number" class="form-control" id="minInteractions" placeholder="互动数下限" min="0">
                    </div>
                </div>
            </div>
            
            <!-- 筛选按钮 -->
            <div class="filter-actions">
                <button class="btn-clear" id="clearFilters">清除筛选</button>
                <button class="btn-filter" id="applyFilters">应用筛选</button>
            </div>
        </div>
        
        <!-- 结果统计和排序 -->
        <div class="results-stats">
            <div class="results-count" id="resultsCount">找到 <strong>24</strong> 个匹配结果</div>
            <div class="sort-options">
                <span class="sort-label">排序方式:</span>
                <select class="form-select form-select-sm" id="sortBy" style="width: auto;">
                    <option value="match">按匹配度降序</option>
                    <option value="recent">最新发布</option>
                    <option value="popular">最受欢迎</option>
                    <option value="ageAsc">年龄升序</option>
                    <option value="ageDesc">年龄降序</option>
                </select>
            </div>
        </div>
        
        <!-- 交友列表 -->
        <div class="card-grid" id="friendsList">
            <!-- 推荐1 - 多图 -->
            <div class="ai-card">
                <div class="card-images">
                    <div class="card-image-multiple">
                        <img src="https://picsum.photos/300/300?random=1" alt="旅行照片1">
                        <img src="https://picsum.photos/300/300?random=2" alt="旅行照片2">
                        <img src="https://picsum.photos/300/300?random=3" alt="旅行照片3">
                        <img src="https://picsum.photos/300/300?random=4" alt="旅行照片4">
                    </div>
                    <div class="image-count">+2</div>
                </div>
                <div class="card-content">
                    <div class="card-header">
                        <div>
                            <div class="user-info">
                                <img src="https://picsum.photos/100/100?random=10" alt="张雨晴的头像" class="user-avatar">
                                <div>
                                    <p class="user-name">张雨晴</p>
                                    <p class="user-meta">26岁 · 上海</p>
                                </div>
                            </div>
                        </div>
                        <div class="match-score">匹配度 92%</div>
                    </div>
                    <h3 class="card-title">寻找旅行伙伴 - 探索小众目的地</h3>
                    <p class="card-description">喜欢深度旅行，探索不为人知的小众景点，擅长摄影和记录旅行故事。希望找到同样热爱旅行的朋友一起规划行程。</p>
                    <div class="card-tags">
                        <span class="card-tag">旅行</span>
                        <span class="card-tag">摄影</span>
                        <span class="card-tag">美食</span>
                        <span class="card-tag">户外</span>
                    </div>
                    <div class="card-actions">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i> 528
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i> 42
                            </div>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn like-btn">
                                <i class="fas fa-heart"></i> 128
                            </button>
                            <button class="action-btn bookmark-btn">
                                <i class="fas fa-bookmark"></i> 76
                            </button>
                            <button class="contact-btn">联系</button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 推荐2 - 单图 -->
            <div class="ai-card">
                <div class="card-images">
                    <img src="https://picsum.photos/600/400?random=20" alt="音乐会照片" class="card-image-single">
                </div>
                <div class="card-content">
                    <div class="card-header">
                        <div>
                            <div class="user-info">
                                <img src="https://picsum.photos/100/100?random=20" alt="李哲的头像" class="user-avatar">
                                <div>
                                    <p class="user-name">李哲</p>
                                    <p class="user-meta">29岁 · 北京</p>
                                </div>
                            </div>
                        </div>
                        <div class="match-score">匹配度 87%</div>
                    </div>
                    <h3 class="card-title">音乐爱好者 - 寻找现场演出同伴</h3>
                    <p class="card-description">痴迷独立音乐和现场演出，经常去livehouse和音乐节。希望找到能一起看演出、分享音乐的朋友。</p>
                    <div class="card-tags">
                        <span class="card-tag">音乐</span>
                        <span class="card-tag">现场演出</span>
                        <span class="card-tag">独立乐队</span>
                    </div>
                    <div class="card-actions">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i> 342
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i> 28
                            </div>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn like-btn">
                                <i class="fas fa-heart"></i> 95
                            </button>
                            <button class="action-btn bookmark-btn">
                                <i class="fas fa-bookmark"></i> 53
                            </button>
                            <button class="contact-btn">联系</button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 推荐3 - 无图 -->
            <div class="ai-card">
                <div class="card-images">
                    <div class="no-image">
                        <i class="fas fa-book-reader"></i>
                        <span>阅读爱好者</span>
                    </div>
                </div>
                <div class="card-content">
                    <div class="card-header">
                        <div>
                            <div class="user-info">
                                <img src="https://picsum.photos/100/100?random=30" alt="王建国的头像" class="user-avatar">
                                <div>
                                    <p class="user-name">王建国</p>
                                    <p class="user-meta">32岁 · 广州</p>
                                </div>
                            </div>
                        </div>
                        <div class="match-score">匹配度 85%</div>
                    </div>
                    <h3 class="card-title">读书会成员 - 每月共读一本书</h3>
                    <p class="card-description">热爱文学和历史，每月组织线上读书会。希望找到认真阅读、乐于分享观点的朋友加入讨论。</p>
                    <div class="card-tags">
                        <span class="card-tag">阅读</span>
                        <span class="card-tag">文学</span>
                        <span class="card-tag">历史</span>
                        <span class="card-tag">线上活动</span>
                    </div>
                    <div class="card-actions">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i> 287
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i> 36
                            </div>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn like-btn">
                                <i class="fas fa-heart"></i> 82
                            </button>
                            <button class="action-btn bookmark-btn">
                                <i class="fas fa-bookmark"></i> 64
                            </button>
                            <button class="contact-btn">联系</button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 推荐4 - 单图 -->
            <div class="ai-card">
                <div class="card-images">
                    <img src="https://picsum.photos/600/400?random=40" alt="健身照片" class="card-image-single">
                </div>
                <div class="card-content">
                    <div class="card-header">
                        <div>
                            <div class="user-info">
                                <img src="https://picsum.photos/100/100?random=40" alt="刘阳的头像" class="user-avatar">
                                <div>
                                    <p class="user-name">刘阳</p>
                                    <p class="user-meta">27岁 · 深圳</p>
                                </div>
                            </div>
                        </div>
                        <div class="match-score">匹配度 83%</div>
                    </div>
                    <h3 class="card-title">健身伙伴招募 - 一起坚持锻炼</h3>
                    <p class="card-description">每周健身4-5次，主要进行力量训练和有氧运动。寻找健身伙伴互相监督、共同进步。</p>
                    <div class="card-tags">
                        <span class="card-tag">健身</span>
                        <span class="card-tag">运动</span>
                        <span class="card-tag">健康</span>
                    </div>
                    <div class="card-actions">
                        <div class="card-stats">
                            <div class="stat-item">
                                <i class="fas fa-eye"></i> 412
                            </div>
                            <div class="stat-item">
                                <i class="fas fa-comment"></i> 53
                            </div>
                        </div>
                        <div class="action-buttons">
                            <button class="action-btn like-btn">
                                <i class="fas fa-heart"></i> 156
                            </button>
                            <button class="action-btn bookmark-btn">
                                <i class="fas fa-bookmark"></i> 89
                            </button>
                            <button class="contact-btn">联系</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 分页 -->
        <div class="pagination-container">
            <ul class="pagination">
                <li class="page-item disabled">
                    <a class="page-link" href="#" aria-label="Previous">
                        <i class="fas fa-chevron-left"></i>
                    </a>
                </li>
                <li class="page-item active"><a class="page-link" href="#">1</a></li>
                <li class="page-item"><a class="page-link" href="#">2</a></li>
                <li class="page-item"><a class="page-link" href="#">3</a></li>
                <li class="page-item">
                    <a class="page-link" href="#" aria-label="Next">
                        <i class="fas fa-chevron-right"></i>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 高级筛选折叠功能
            const advancedToggle = document.getElementById('advancedToggle');
            const advancedFilters = document.getElementById('advancedFilters');
            const advancedIcon = document.getElementById('advancedIcon');
            
            advancedToggle.addEventListener('click', function() {
                advancedFilters.style.display = advancedFilters.style.display === 'none' ? 'block' : 'none';
                advancedIcon.classList.toggle('fa-chevron-down');
                advancedIcon.classList.toggle('fa-chevron-up');
            });
            
            // 兴趣标签筛选
            const tagItems = document.querySelectorAll('.tag-item');
            tagItems.forEach(tag => {
                tag.addEventListener('click', function() {
                    this.classList.toggle('active');
                });
            });
            
            // 筛选按钮功能
            const applyFiltersBtn = document.getElementById('applyFilters');
            const clearFiltersBtn = document.getElementById('clearFilters');
            const resetAllFiltersBtn = document.getElementById('resetAllFilters');
            const resultsCount = document.getElementById('resultsCount');
            
            // 应用筛选
            applyFiltersBtn.addEventListener('click', function() {
                // 模拟筛选加载
                this.innerHTML = '<i class="fas fa-spinner fa-spin me-2"></i>筛选中...';
                
                // 获取筛选条件（实际应用中会发送到服务器）
                const filters = {
                    matchDegree: document.getElementById('matchDegree').value,
                    minAge: document.getElementById('minAge').value,
                    maxAge: document.getElementById('maxAge').value,
                    city: document.getElementById('city').value,
                    gender: document.getElementById('gender').value,
                    interests: Array.from(document.querySelectorAll('.tag-item.active')).map(tag => tag.textContent),
                    activeTime: document.getElementById('activeTime').value,
                    socialPurpose: document.getElementById('socialPurpose').value,
                    contentPreference: document.getElementById('contentPreference').value,
                    minViews: document.getElementById('minViews').value,
                    minInteractions: document.getElementById('minInteractions').value
                };
                
                console.log('应用筛选条件:', filters);
                
                // 模拟筛选延迟
                setTimeout(() => {
                    this.innerHTML = '应用筛选';
                    
                    // 随机生成1-24之间的结果数量，模拟筛选效果
                    const randomResults = Math.floor(Math.random() * 24) + 1;
                    resultsCount.innerHTML = `找到 <strong>${randomResults}</strong> 个匹配结果`;
                    
                    // 显示筛选成功提示（实际应用中可省略）
                    const alertDiv = document.createElement('div');
                    alertDiv.className = 'alert alert-success alert-dismissible fade show position-fixed top-20 end-3 z-3';
                    alertDiv.role = 'alert';
                    alertDiv.innerHTML = `筛选已应用，找到 ${randomResults} 个匹配结果`;
                    
                    const closeBtn = document.createElement('button');
                    closeBtn.type = 'button';
                    closeBtn.className = 'btn-close';
                    closeBtn.dataset.bsDismiss = 'alert';
                    closeBtn.ariaLabel = 'Close';
                    
                    alertDiv.appendChild(closeBtn);
                    document.body.appendChild(alertDiv);
                    
                    // 3秒后自动关闭提示
                    setTimeout(() => {
                        const bsAlert = new bootstrap.Alert(alertDiv);
                        bsAlert.close();
                    }, 3000);
                }, 1200);
            });
            
            // 清除当前筛选
            clearFiltersBtn.addEventListener('click', function() {
                // 清空输入框
                document.getElementById('minAge').value = '';
                document.getElementById('maxAge').value = '';
                document.getElementById('minViews').value = '';
                document.getElementById('minInteractions').value = '';
                
                // 重置下拉选择框
                document.getElementById('matchDegree').value = 'all';
                document.getElementById('city').value = 'all';
                document.getElementById('gender').value = 'all';
                document.getElementById('activeTime').value = 'all';
                document.getElementById('socialPurpose').value = 'all';
                document.getElementById('contentPreference').value = 'all';
                
                // 清除标签选择
                document.querySelectorAll('.tag-item.active').forEach(tag => {
                    tag.classList.remove('active');
                });
            });
            
            // 重置所有筛选（包括排序）
            resetAllFiltersBtn.addEventListener('click', function() {
                // 调用清除筛选方法
                clearFiltersBtn.click();
                
                // 重置排序
                document.getElementById('sortBy').value = 'match';
                
                // 重置结果计数
                resultsCount.innerHTML = '找到 <strong>24</strong> 个匹配结果';
            });
            
            // 排序功能
            document.getElementById('sortBy').addEventListener('change', function() {
                const sortType = this.value;
                let sortText = '';
                
                switch(sortType) {
                    case 'match': sortText = '按匹配度降序'; break;
                    case 'recent': sortText = '最新发布'; break;
                    case 'popular': sortText = '最受欢迎'; break;
                    case 'ageAsc': sortText = '年龄升序'; break;
                    case 'ageDesc': sortText = '年龄降序'; break;
                }
                
                // 显示排序提示
                const alertDiv = document.createElement('div');
                alertDiv.className = 'alert alert-info alert-dismissible fade show position-fixed top-20 end-3 z-3';
                alertDiv.role = 'alert';
                alertDiv.innerHTML = `已按 ${sortText} 排序`;
                
                const closeBtn = document.createElement('button');
                closeBtn.type = 'button';
                closeBtn.className = 'btn-close';
                closeBtn.dataset.bsDismiss = 'alert';
                closeBtn.ariaLabel = 'Close';
                
                alertDiv.appendChild(closeBtn);
                document.body.appendChild(alertDiv);
                
                // 2秒后自动关闭提示
                setTimeout(() => {
                    const bsAlert = new bootstrap.Alert(alertDiv);
                    bsAlert.close();
                }, 2000);
            });
            
            // 点赞功能
            const likeBtns = document.querySelectorAll('.like-btn');
            likeBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    
                    if (this.classList.contains('active')) {
                        // 取消点赞
                        this.classList.remove('active');
                        icon.classList.remove('fas');
                        icon.classList.add('far');
                        
                        // 更新点赞数
                        if (this.textContent.trim().match(/\d+/)) {
                            let count = parseInt(this.textContent.trim().match(/\d+/)[0]);
                            this.innerHTML = `<i class="${icon.classList.value}"></i> ${count - 1}`;
                        }
                    } else {
                        // 点赞
                        this.classList.add('active');
                        icon.classList.remove('far');
                        icon.classList.add('fas');
                        
                        // 更新点赞数
                        if (this.textContent.trim().match(/\d+/)) {
                            let count = parseInt(this.textContent.trim().match(/\d+/)[0]);
                            this.innerHTML = `<i class="${icon.classList.value}"></i> ${count + 1}`;
                        }
                    }
                });
            });
            
            // 收藏功能
            const bookmarkBtns = document.querySelectorAll('.bookmark-btn');
            bookmarkBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    this.classList.toggle('active');
                });
            });
            
            // 分页功能
            const pageLinks = document.querySelectorAll('.page-link:not([aria-label])');
            pageLinks.forEach(link => {
                link.addEventListener('click', function(e) {
                    e.preventDefault();
                    
                    // 移除所有活跃状态
                    document.querySelectorAll('.page-item').forEach(item => {
                        item.classList.remove('active');
                    });
                    
                    // 添加当前页活跃状态
                    this.parentElement.classList.add('active');
                });
            });
        });
    </script>
</body>
</html>
    
